package me.firstapp.repository.shop;

import java.util.Date;
import java.util.List;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.shop.Product;
import me.firstapp.repository.base.EntityRepository;

public interface ProductRepository extends EntityRepository<Product> {

	Page<Product> findProductPage(Integer pageNo, Integer pageSize, Long categoryId, Integer disable, Long apiClientId);

	Product findProductById(Long productId, Long apiClientId);
	
	Product findProductByName(String name, Long apiClientId);
	
	Page<Product> findProductPageByParams(Integer pageNo, Integer pageSize, Map<String, Object> searchParams,
			String sortParam, String sortType, Date startTime, Date endTime, Long apiClientId);
	
	List<Product> findProducts(Integer disable, Long apiClientId);
}
